package com.principle.proxy.cglib;

public class Client {
    public static void main(String[] args) {
        TeacherDao teacherDao = new TeacherDao();
        ProxyFactory proxyFactory = new ProxyFactory(teacherDao);
        TeacherDao proxyInstance = (TeacherDao) proxyFactory.getProxyInstance();
        //执行代理对象的方法，触发 intecept 方法，从而实现对目标方法的调用
        proxyInstance.teach();
    }
}
